

*********************************** FOLDERS ************************************
clear all
set more off

* Define paths for different data and output folders using the project path
cd "C:\Users\..." 								// Main project path
global package "C:\Users\..."					// Main project path
global file "$package\pseudo_data\" 			// Path for data sources and intermediate files
global output "$package\output\" 				// path for tables
global codes "$package\codes\" 					// Path for codes

************* LIST OF PROVIDED STATA FILES *********************************

//Nomenclatures sources files
"${file}.Nomenclature\int_courts_naf_rev_2.csv" 				// Labels NAFrev2
"${file}.Nomenclature\Nomenclatures-NAF-rev-2_anglais.csv" 		//Labels English NAFrev2
"${file}.Nomenclature\naf2008_5_niveaux.csv" 					// Levels NAFrev2
"${file}.Nomenclature\naf2003_n1-5.csv" 						// Levels NAFrev1
"${file}.Nomenclature\table_NAF2-NAF1.xls" 						// correspondence NAFrev2 NAFrev1
"${file}.Nomenclature\table_NAF1-NAF2.xls" 						// correspondence NAFrev1 NAFrev2
"${file}.Nomenclature\INOVA.csv" 								// List of innovative sectors

// Nomemclatures intermediate files
use "${file}nafniveauxrev2.dta", clear 			// Levels NAFrev2
use "${file}nafniveauxrev1.dta", clear 			// Levels NAFrev1
use "${file}ape_rev12.dta", clear 			    // correspondence NAFrev1 NAFrev2
use "${file}APElibel-eng.dta", clear  			// Labels English NAFrev2
use "${file}INOVA.dta", clear 				    // List of innovative sectors with labels

// aggregated pseudo-source files
use "${file}sinex.dta", clear  					// aggregated SINE surveys
use "${file}ficusfare.dta", clear  				// aggregated FICUS-FARE
use "${file}dads_ent_all.dta", clear  			// aggregated DADS ENT
use "${file}stocks-ent-2000-2018.dta", clear  	// aggregated firm registry (sirene)
use "${file}creation.dta", clear  				// aggregated new firms registry (sirene creation)

// intermediate pseudo-data files
use "${file}ficusfare_all.dta", clear  			// aggregated FICUS-FARE + precleanning
use "${file}characteristics_naf.dta", clear  	// sectors' charactersitics calculated from FICUS-FARE
use "${file}sirene.dta", clear  				// aggregated firm registry (sirene) + precleaning
use "${file}sirene_light.dta", clear  			// aggregated firm registry (sirene) + retropolated sector
use "${file}survie.dta", clear    				// firms' survival using firm registry (sirene)
use "${file}female_sine.dta", clear  			// female-dominated sectors using firms in SINE survey
use "${file}female_creation.dta", clear  		// female-dominated sectors using sirene creation
use "${file}female_sector.dta", clear  			// female-dominated sectors using sirene stock
use "${file}sine_panel.dta", clear  			// main constructed dataset


****************************** RUN CODES **************************************

* Execute a series of .do files in the specified order

****************** MAIN TEXT ****************************
do "$codes/1_Nomemclatures.do"      // Create Nomemclatures
do "$codes/2_SIRENE_final.do"   	// Aggregate Sirene files (Firm registries) and create variables
do "$codes/3_FICUS-FARE_final.do"   // Aggregate Ficus-Fare (balance-sheets) and create variables
do "$codes/4_Final dataset.do"  	// Merge sources, create variables, define variables

do "$codes/Tables 1, 2_Descriptive Statistics.do" // descriptive statistics - Tables 1, 2
do "$codes/Tables 3,4,5,6,7,8_Regressions.do" 	  // regressions SINE - Tables 3, 4, 5, 6, 7, 8
do "$codes/Table 9_Performance.do"                // regressions performance - Table 9
do "$codes/Table 10_PME survey.do" 				  // regressions PME survey - Table 10
do "$codes/Figure 1_OaxacaBlinder.do" 			  // oaxaca-blinder figure - Figure 1










